from string import Template
# import string
#
# characters = string.ascii_letters + string.digits  # 大小写字母+数字
# total = 10000
# length = 1 # 每个字符串长度
#
# # 生成连续无换行的超长字符串（总长度 = 10000*8 = 80000）
# random_sequence = ''.join(
#     ''.join(random.choice(characters) for _ in range(length))
#     for _ in range(total)
# )
#
# # 写入文件（无任何换行符）
# with open("random_strings.txt", "w") as f:
#     f.write(random_sequence)
#
# print(f"已生成 {len(random_sequence)} 个连续字符，无换行分隔。")

# checkId = None
#
# url = "/api/front/news/${checkId}"
# checkId = {"checkId": checkId} if checkId is not None else checkId
# print(checkId)
# new_url = Template(url).substitute(checkId)
#
# print(new_url)

# a = []
# a = set(a)
# print(a)

# all_res_json = {"code":"00000","message":"一切 ok","data":{"pageNum":"1","pageSize":"10","total":"4","list":[{"id":"1445988184596992129","bookId":None,"chapterNum":None,"chapterName":"4 初遇王星辰","chapterWordCount":None,"chapterUpdateTime":"2025-06-18 09:19","isVip":"0"},{"id":"1445988184596992128","bookId":None,"chapterNum":None,"chapterName":"4 初遇钟甄","chapterWordCount":None,"chapterUpdateTime":"2025-06-18 09:09","isVip":"0"},{"id":"1445988184596992127","bookId":None,"chapterNum":None,"chapterName":"3 沈彗星","chapterWordCount":None,"chapterUpdateTime":"2025-06-18 08:51","isVip":"0"},{"id":"1445988184596992123","bookId":None,"chapterNum":None,"chapterName":"2 肖鹿","chapterWordCount":None,"chapterUpdateTime":"2025-06-17 15:47","isVip":"0"}],"pages":"1"},"ok":True}
# print(type(all_res_json))
# print(all_res_json["data"]["list"][0]["id"])
# a = {"1": "aaa", "2": "bbb"}
# print(a["1"])

a = {3: {'code': '00000', 'message': '一切 ok', 'data': {'uid': '1', 'nickName': '18855688009', 'token': 'eyJzeXN0ZW1LZXlIZWFkZXIiOiJmcm9udCIsImFsZyI6IkhTMjU2In0.eyJzdWIiOiIxIn0.bjqJ6Rp6PzZ0Y9Sjk53ITn2y-O6eilxNmcKtb2CKrg0'}, 'ok': True}, 63: {'code': '00000', 'message': '一切 ok', 'data': {'pageNum': '1', 'pageSize': '10', 'total': '4', 'list': [{'id': '1445988184596992129', 'bookId': None, 'chapterNum': None, 'chapterName': '4 初遇王星辰', 'chapterWordCount': None, 'chapterUpdateTime': '2025-06-18 09:19', 'isVip': '0'}, {'id': '1445988184596992128', 'bookId': None, 'chapterNum': None, 'chapterName': '4 初遇钟甄', 'chapterWordCount': None, 'chapterUpdateTime': '2025-06-18 09:09', 'isVip': '0'}, {'id': '1445988184596992127', 'bookId': None, 'chapterNum': None, 'chapterName': '3 沈彗星', 'chapterWordCount': None, 'chapterUpdateTime': '2025-06-18 08:51', 'isVip': '0'}, {'id': '1445988184596992123', 'bookId': None, 'chapterNum': None, 'chapterName': '2 肖鹿', 'chapterWordCount': None, 'chapterUpdateTime': '2025-06-17 15:47', 'isVip': '0'}], 'pages': '1'}, 'ok': True}}
print(a["3"])